package com.zp.base.mapper.price;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zp.base.api.bo.PriceListBo;
import com.zp.base.api.entity.PriceList;
import com.zp.base.api.vo.PriceListVo;
import com.zp.common.myBatis.core.mapper.BaseMapperPlus;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 价表Mapper接口
 *
 * @author zhang peng
 * @ date 2023-01-05
 */
@Repository
public interface PriceListMapper extends BaseMapperPlus<PriceListMapper, PriceList, PriceListVo> {

    /**
     * 启用修改停止时间
     *
     * @param priceList
     * @return
     */
    int updatePriceEnable (PriceList priceList);

    /**
     * 当前价表自动补全
     *
     * @param bo
     * @return
     */
    List<PriceListVo> getCurrentPriceList (PriceListBo bo);

    /**
     * 获取诊疗项目已对照的价表
     *
     * @param bo
     * @return
     */
    List<PriceListVo> selectContrastExist (PriceListBo bo);

    /**
     * 获取分页list
     *
     * @param page
     * @param bo
     * @return
     */
    Page<PriceListVo> selectVoPage (@Param("page") Page<PriceListBo> page, @Param("bo") PriceListBo bo);

    /**
     * 通过priceI_id获取价表对象
     *
     * @param priceId
     * @return
     */
    PriceListVo selectVoById (@Param("priceId") String priceId);
}
